function displayAlert(type, data, time){

    var pr = document.querySelector("#pr");
    var lunbo=document.createElement("div");
    
    if(type == "success") {
        lunbo.style.backgroundImage = "linear-gradient(to right, #fcdaf4 5%, #b3f2f8 60%)";
    } else if(type == "error") {
        lunbo.style.backgroundColor = "#990000";
    } else if(type == "info") {
        lunbo.style.backgroundColor = " #e6b800";
    } else {
        console.log("入参type错误");
        return;
    }

    lunbo.id="lunbo";
    lunbo.style.paddingLeft = "30px";
    lunbo.style.paddingRight = "30px";
    
    lunbo.style.color = "white";
    lunbo.style.fontSize = "25px";
    lunbo.style.borderRadius = "20px";
    lunbo.style.textAlign="center";
    lunbo.style.lineHeight="50px";
    // lunbo.style.margin = "0 auto";
    if(document.getElementById("lunbo")==null){
        pr.appendChild(lunbo);
        lunbo.innerHTML=data;
        setTimeout(function(){
            pr.removeChild(lunbo);
        } ,time);
    }
}
